//
//  SwitchTableViewCell.m
//  Car
//
//  Created by lanou on 15/10/5.
//  Copyright (c) 2015年 朱鸿儒. All rights reserved.
//

#import "SwitchTableViewCell.h"


@implementation SwitchTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
        _lable = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, 100, 30)];
        _lable.text = @"无图模式";
        [self addSubview:_lable];
        
        _sw = [[UISwitch alloc] initWithFrame:CGRectMake(kWidth - 60, 0, 50, 20)];
        
        [_sw addTarget:self action:@selector(swClick:) forControlEvents:(UIControlEventValueChanged)];
        [self addSubview:_sw];
        
        
        UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, 40, kWidth, 0.5)];
        line.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:line];
        
    }
    return self;
}
- (void)setWithString:(NSString *)str{
    _lable.text = str;
    
}
- (void)swClick:(UISwitch *)sw{
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
